package com.scs.application.modules.sys.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * <p>
 * 用户
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "用户表")
@TableName("sys_user")
public class User extends SimpleDataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "机构ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String officeId;

    // 部门编码
    @TableField(exist = false)
    private String officeInnerCode;

    @EntityFieldAnnotation(
            text = "登录名",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String code;

    @EntityFieldAnnotation(
            text = "用户名",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String name;

    @EntityFieldAnnotation(
            text = "密码",
            length = "32",
            not_null = true,
            default_value = "",
            comment = ""
    )
    @JsonIgnore
    private String password;

    @EntityFieldAnnotation(
            text = "工号",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String workNo;

    @EntityFieldAnnotation(
            text = "头像",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String avatarUrl;

    @EntityFieldAnnotation(
            text = "手机",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String mobile;


    @EntityFieldAnnotation(
            text = "职位",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String title;

    @EntityFieldAnnotation(
            text = "联系方式",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String contact;

    @EntityFieldAnnotation(
            text = "邮件",
            length = "80",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String email;

    @EntityFieldAnnotation(
            text = "其他系统编码",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String innerCode;

    @EntityFieldAnnotation(
            text = "备注",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;

    @EntityFieldAnnotation(
            text = "缩略图片地址",
            length = "120",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String thumbnailImageUrl;


    @EntityFieldAnnotation(
            text = "用户状态PC",
            type = EntityFieldType.TEXT,
            not_null = false,
            default_value = "",
            comment = "PC端用户状态数据,json格式"
    )
    private String statePc;


    @EntityFieldAnnotation(
            text = "用户状态APP",
            type = EntityFieldType.TEXT,
            not_null = false,
            default_value = "",
            comment = "APP端用户状态数据,json格式"
    )
    private String stateApp;

}
